#pragma once
#include "cocos2d.h"
#include "AppDelegate.h"
#include "EventHelper.h"
#include "UIMusicSelect.h"
#include "NoteManager.h"
#include "UICommon.h"

USING_NS_CC;

class MSCHispeed :public LayerColor, public EventHelper
{
	public:
	MSCHispeed() :EventHelper(this) {};
	static MSCHispeed* create(Size disparea);

	float hsvalue = 2.5;

	private:
	float barheight;
	Size disparea;
	UICSliderBar* bar;

	void createText();
	void createBar();

	void onMouseUp(Event* e);
};

class MusicSelectConsole :public LayerGradient
{
	public:
	MusicSelectConsole() {};
	static MusicSelectConsole* create(Size disparea, int comcols = 5, int comrows = 2);

	MSCHispeed* comHispeed;

	int orbitAngelZ = 0;

	private:
	Size disparea;
	int comrows;
	int comcols;
	float comheight;
	float comwidth;
	Size comsize;
	Size uicsize;

	public:
	Size getSize();
	void createTitle();
	void createOptions();
	void addOption(int col, int row, string name, Node* uicomponent);

	private:
	Vec2 compos(float col, float row) { return Vec2(col*comwidth, (comrows - row)*comheight*1.1f); };
};

namespace UIMusicSelectConsoleComponent
{
	UICSliderBar* optionHispeed(Size size);
	UICDropdownList* optionKeysetType(Size size);
}